package org.ykh.iruleConfig;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author ykh
 * @create 2022-01-20 20:21
 */
@Configuration
public class IruleConfig {
    @Bean
    public IRule myRule(){
        return new RandomRule();//替换默认的负载均衡策略
    }
}
